Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 'use strict' |
||
6 | test('should render the templates correctly', (done) => { |
||
7 | const req = {} |
||
8 | const res = {} |
||
9 | const next = () => {} |
||
10 | |||
11 | const opts = { |
||
12 | engine: cons.pug, |
||
13 | dir: path.join(__dirname, '../example') |
||
14 | } |
||
15 | |||
16 | middleware(opts)(req, res, next) |
||
17 | |||
18 | res.render('view.pug', { name: 'nameless' }, (error, html) => { |
||
19 | expect(error).toBeNull() |
||
20 | expect(html).toEqual('<p style="color:red">nameless</p>') |
||
21 | done() |
||
22 | }) |
||
23 | }) |
||
24 |